package task9;

import java.util.Scanner;
/**
 * @author banana
 * 求阶乘
 */
public class Task2 {
    public static void main(String[] args) {
        System.out.println("请输入一个数!");
        Scanner scanner=new Scanner(System.in);
        int num=scanner.nextInt();
        int sum=1;int i;
        for(i=num;i>0;i--){
            sum=sum*i;
        }
        System.out.println(num+"的阶乘是"+sum);
    }
}
